import { createBrowserRouter } from 'react-router-dom';
import { Env } from './vite_env';
import App from './pages/App';
const env = import.meta.env as ImportMetaEnv & Env;

const router = createBrowserRouter(
  [
    {
      path: '/',
      element: <App></App>,
    },
  ],
  {
    basename: env.VITE_ROUTER_PRE_PATH,
    future: {
      v7_relativeSplatPath: true,
      v7_fetcherPersist: true,
      v7_normalizeFormMethod: true,
      v7_partialHydration: true,
      v7_skipActionErrorRevalidation: true,
    },
  }
);

export default router;
